<template>
	<view>
		<view class="outin" v-for="(item,index) in functions" :key="index">
			<view :style="`background-color: ${item.color};
			font-size:23px;
			height:100px;width:320px;line-height:100px;
			color:snow;
			`" @click="go(item)">
				<uni-icons :type="item.type" size=40 style="folat:left;padding:30px;color:snow"></uni-icons> 
				<text style="">{{item.name}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				functions:[{
					name:'入校申请填报',
					type:'compose',
					color:'#F4A439',
					url:'/pages/index/out-in/in'
				},{
					name:'离校申请填报',
					type:'compose',
					color:'#06BEBE',
					url:'/pages/index/out-in/out'
				},{
					name:'查看申请结果',
					type:'paperplane',
					color:'#4095E5',
					url:'/pages/index/out-in/resultlist'
				}]
			}
		},
		methods: {
			go(item){
				uni.navigateTo({
					url: item.url,
					success: res => {},
					fail: () => {},
					complete: () => {}
				});
			}
		}
	}
</script>
<style>
	.outin{
		width:100vw;
		margin:20px auto;
		display: flex;
		justify-content:center;
	}
</style>
